package com.zxy.ziems.server.energy.pojo.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class EnergyPriceTagDTO {
    @NotBlank(message = "标签不可为空")
    private String tag; // 标签

    @NotNull(message = "分段价格不可为空")
    private BigDecimal price; // 价格

    @NotBlank(message = "能源单价ID", groups = {EnergyPriceTimeDTO.Add.class})
    private String energyPriceId; // 能源单价ID

    @NotEmpty(message = "分段不可为空")
    private List<EnergyPriceTimeDTO> times;

}
